package com.xyh.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author:kyle
 * @Date:2020/12/23 - 17:12
 * @Project:spring_StudentsDormitoryManagementSystem
 * @Package:com.xyh.po
 * @Version:1.0
 */
@Getter
@Setter
@NoArgsConstructor
@Component
@TableName("t_home")
public class Home implements Serializable {
    @TableId(value = "home_pkid",type = IdType.AUTO)
    private Integer id;
    private String address;
    private Integer maxnum;
    private Integer innum;
    private String rental;
    private String status;
    private String landlord;
    private String tel;
    private String type;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;
    private String buildingtype;
    private String paytype;

    @Override
    public String toString() {
        return "Home{" +
                "id=" + id +
                ", address='" + address + '\'' +
                ", maxnum=" + maxnum +
                ", innum=" + innum +
                ", rental='" + rental + '\'' +
                ", status='" + status + '\'' +
                ", landlord='" + landlord + '\'' +
                ", tel='" + tel + '\'' +
                ", type='" + type + '\'' +
                ", date=" + date +
                ", buildingtype='" + buildingtype + '\'' +
                ", paytype='" + paytype + '\'' +
                '}';
    }
}
